package com.fjec.common.util;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class OSSConfig {
	public static final String ACCESS_KEY_ID = "LTAIXhWbmLXtHsdn";
	
	public static final String ACCESS_KEY_SECRET = "ACR3eKY3gCrS68uQ2DWRa7fcuPlIvI";
	//外网上传地址
//	public static final String END_POINT = "oss-cn-beijing.aliyuncs.com";
	//内网上传地址				oss-cn-beijing-internal.aliyuncs.com
	public static String END_POINT = "oss-cn-beijing.aliyuncs.com";
	//外网访问地址
	public static String BUC_KET = "oss-cn-beijing.aliyuncs.com";
	//oss上存储给空间名称
	public static final String BUCKET_NAME = "pfks-oss-center";
	//你上传文件的保存路径，如果bucket中不存在则创建（其实原理并不是文件夹，只是文件名，详情请先阅读官方文档）
	public static final String PIC_LOCATION = "";

	@Value("${oss.config.url.out}")
	public static void setEndPoint(String endPoint) {
		OSSConfig.END_POINT = endPoint;
	}

	@Value("${oss.config.url.in}")
	public static void setBucKet(String bucKet) {
		OSSConfig.BUC_KET = bucKet;
	}
}

